import mysql.connector as mc


def py_db_insert():
    try:
        com = mc.connect(
            host = "127.0.0.1",
            port = "3306",
            user = "root",
            password = "05130422",
            database = "zuoye",
            charset = "utf8"
        )
    except mc.Error as e:
        print("连接失败！！")
    else:
        print("连接成功")

        a=list("customer_name","sex","name","speciality","college","create_time")
        sql = "select a from 'resume_upload'"
        cur = com.cursor()
        cur.execute(sql)
        value = cur.fetchall()
        print(value)







        # cur.execute("customer_name","sex","name","speciality","college","create_time")











if __name__ == '__main__':
    py_db_insert()






























